home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / etc / ppp / ip-down.d / 0000usepeerdns next >
Text File  |  2008-10-15  |  559b  |  25 lines

  1. #!/bin/sh -e
  2.  
  3. # exit if the resolvconf package is installed
  4. [ -x /sbin/resolvconf ] && exit 0
  5.  
  6. # follow any symlink to find the real file
  7. if [ -e /etc/resolv.conf ]; then
  8.   REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)
  9. else
  10.   REALRESOLVCONF=/etc/resolv.conf
  11. fi
  12.  
  13. # if an old resolv.conf file exists, restore it
  14. if [ -e $REALRESOLVCONF.pppd-backup ]; then
  15.   mv -f $REALRESOLVCONF.pppd-backup $REALRESOLVCONF
  16.  
  17.   # restart nscd because resolv.conf has changed
  18.   if [ -e /var/run/nscd.pid ]; then
  19.     /etc/init.d/nscd restart || true
  20.   fi
  21. fi
  22.  
  23. exit 0
  24.  
  25.